﻿using System;
using System.Runtime.Serialization;
using LiSA_Server.Base.AbstractContracts;
using LiSA_Server.Base.Factories;
using LiSA_Service.ResearchProjects.Actioners;

namespace LiSA_Service.ResearchProjects.Dto.Queries
{
    [DataContract]
    public class ProjectShortinfoQuery : Query
    {
        [DataMember]
        public Guid OwnerID { get; set; }

        public override QueryResult Execute()
        {
            return new ProjectShortinfoQueryResult
            {
                ShortInfos = ActionerFactory.Instance.Get<ProjectActioner>().GetAllProjectsForUserID(this)
            };
        }
    }
}